package com.lagou.edu.controller;

import com.lagou.edu.annotion.LgAutowried;
import com.lagou.edu.annotion.LgController;
import com.lagou.edu.annotion.LgRequestMapping;
import com.lagou.edu.annotion.Security;
import com.lagou.edu.service.DemoService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@LgController
@LgRequestMapping("/demo")
@Security(value = {"cole"})
public class DemoController {
    @LgAutowried
    private DemoService demoService;

    @LgRequestMapping("/handler01")
    @Security({"meili"})
    public void handle01(){
        System.out.println("handle01!!!!!");
        return;
    }

    @LgRequestMapping("/query")
    @Security({"zhangsan","lisi"})
    public String query(HttpServletRequest request, HttpServletResponse response,String name){
        String s = demoService.get(name);
        return s;
    }
}
